<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html lang="zh-CN">
	<head> 
    <meta charset="UTF-8">
    <%@ include file="/WEB-INF/views/include/head.jsp"%>
    <link rel="stylesheet" href="${ctxStatic}/css/common_erp.css">
    <link rel="stylesheet" href="${ctxStatic}/css/layerSm.css"> 
    <script type="text/javascript">
    function deleteCustemer(){
    	if (confirm("<spring:message code="customer_areYouSure"/>")) {
    		var id = $("#id").val();
    		var param = {"id":id };
    		$.post("${ctx}/custemer/message/delete",param,function(result){
    		var  delFlag = result["delFlag"];
    		if (delFlag=="true") {
	    		/* 弹出提示框,刷新父页面,关闭当前页面 */
	    		tipParent("<spring:message code="customer_delete_returnMsgSu"/>");
	    		 window.parent.frames[0].searchListForm();
	    	    closeWin();
			}else{
				tipParent("<spring:message code="customer_delete_returnMsgFa"/>");
			}
				
    		},'json');
		}
    }
    </script>
    </head>
	<body>
	<div class="layerHeader clearfix">
		<p class="headerTitle"><spring:message code="customer_head_show_customer_info"/></p>
	    <div class="headerButton clearfix">
	    <!-- 删除  -->
        <shiro:hasPermission name="custemer:message:edit">
          <button type="button" onclick="deleteCustemer();">
               	<spring:message code="customer_btn_delete" />
          </button>
          </shiro:hasPermission>
	    	<shiro:hasPermission name="custemer:message:edit">
	        <button type="button" onClick="window.location.href='${ctx}/custemer/message/form?id=${ognization.id}'"><spring:message code="customer_btn_edit"/></button>
	        </shiro:hasPermission>
	        <button type="button" onclick="closeWin()"><spring:message code="customer_btn_cancel"/></button>
	    </div>
	</div>
	<input type="hidden" id="id" value="${ognization.id}"/>
	<div class="smList">
	        <div class="items clearfix">
	        	<div class="col-50 clearfix">
	                <p class="tit"><spring:message code="customer_code"/></p>
	                <p>${ognization.ognizationCode}</p>
	            </div>
	        </div>
	        <div class="items clearfix">
	        	<div class="col-50 clearfix">
	                <p class="tit"><spring:message code="customer_name"/></p>
	                <p>${ognization.ognizationName}</p>
	            </div>
	            <div class="col-50 right clearfix">
	                <p class="tit"><spring:message code="customer_customer_category"/></p>
	                <p>${fns:getDictName(ognization.ognizationCategoryCd)}</p>
	            </div>
	        </div>
	        <div class="items clearfix">
	        	<div class="col-50 clearfix">
	                <p class="tit"><spring:message code="customer_simple_name"/></p>
	                <p>${ognization.ognizationSimpleName}</p>
	            </div>
	            <div class="col-50 right clearfix">
	                <p class="tit"><spring:message code="customer_customer_level"/></p>
	                <p>${fns:getDictName(ognization.ognizationLevelCd)}</p>
	            </div>
	        </div>
	        <div class="items clearfix">
	        	<div class="col-50 clearfix">
	                <p class="tit"><spring:message code="customer_country"/></p>
	                <p>${fns:getDictName(ognization.ognizationCountry)}</p>
	            </div>
	            <div class="col-50 right clearfix">    
	                <p class="tit"><spring:message code="customer_city"/></p>
	                <p>${fns:getDictName(ognization.ognizationCity)}</p>
	            </div>
	        </div>
	        <div class="items clearfix">
	        	<div class="col-50 clearfix">
	                <p class="tit"><spring:message code="customer_customer_address"/></p>
	                <div style="float:left;border:1px;width:70%;" class="text_overflow" data-toggle="tooltip">${ognization.ognizationAddress}</div>
	            </div>
	            <div class="col-50 right clearfix">
	                <p class="tit"><spring:message code="customer_customer_zipcode"/></p>
	                <p>${ognization.ognizationZipCode}</p>
	            </div>
	        </div>
	        <div class="items clearfix">
	        	<div class="col-50 clearfix" style="height:130px">
	                <div style="float:left;border:1px;width:20%;"><spring:message code="customer_description"/></div>
	                <div style="float:left;border:1px;width:70%;">${ognization.ognizationDescription}</div>
	            </div>
	            <div class="col-50 right clearfix">
	                <p class="tit"><spring:message code="customer_contact_person"/></p>
	                <p>${ognization.contactPerson}</p>
	            </div>
	            <div class="col-50 right clearfix">
	                <p class="tit"><spring:message code="customer_contact_phone"/></p>
	                <p>${ognization.contactPhone}</p>
	            </div>
	        </div>
	        <div class="items clearfix">
	        	<div class="col-50 clearfix">
	                <p class="tit"><spring:message code="customer_bankAccount"/></p>
	                <p>${ognization.bankName}</p>
	            </div>
	            <div class="col-50 right clearfix">
	                <p class="tit"><spring:message code="customer_fax"/></p>
	                <p>${ognization.contactFax}</p>
	            </div>
	        </div>
	        <div class="items clearfix">
	        	<div class="col-50 clearfix">
	                <p class="tit"><spring:message code="customer_bankAccountNO"/></p>
	                <p>${ognization.bankAccountNo}</p>
	            </div>
	            <div class="col-50 right clearfix">
	                <p class="tit"><spring:message code="customer_emial"/></p>
	                <p>${ognization.contactEmail}</p>
	            </div>
	        </div>
	        <div class="items clearfix">
	        	<div class="col-50 clearfix">
	                <p class="tit"><spring:message code="customer_brand"/></p>
	                <p>${ognization.commaBrandName}</p>
	            </div>
	        </div>
	        <div class="items clearfix">
	        	<div class="col-50 clearfix">
	                <p class="tit"><spring:message code="customer_creater"/></p>
	                <p>${ognization.createBy.firstName}${ognization.createBy.lastName}</p>
	            </div>
	            <div class="col-50 right clearfix">
	                <p class="tit"><spring:message code="customer_create_date"/></p>
	                <p><fmt:formatDate value="${ognization.createDate}" pattern="yyyy-MM-dd HH:mm" /></p>
	            </div>
	        </div>
	</div>
	</body>
</html>